<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <!--
    =================================================
      * 页面名称: 404未发现资源模板
      * 文件路径: 404.html
      * 作者: 孤山寺北
      * 邮箱: 3150675236@qq.com
      * 网站: https://www.gsav.cn
      * 创建日期: 2025-7-3
      * 最后更新: 2025-7-3
      * 版本: v1.0.0
      * 版权声明: Copyright (c) 2025 GSAV.CN . 保留所有权利。
      * 许可证: MIT License
      * 描述: 优雅的404页面模板
      =================================================
    -->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>页面未找到</title>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap">
    <style>
        :root {
            --primary: #3b82f6;
            --warning: #f59e0b;
            --text: #1f2937;
            --text-light: #6b7280;
            --border: #e5e7eb;
            --radius: 8px;
            --space: 24px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
            background-color: #ffffff;
            color: var(--text);
            line-height: 1.5;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            padding: var(--space);
        }

        .notfound-container {
            max-width: 480px;
            margin: auto;
            width: 100%;
            text-align: center;
        }

        .notfound-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto var(--space);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .notfound-icon-circle {
            position: absolute;
            width: 100%;
            height: 100%;
            border: 2px solid var(--warning);
            border-radius: 50%;
            opacity: 0.8;
        }

        .notfound-icon-inner {
            width: 60%;
            height: 60%;
            background-color: var(--warning);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 24px;
            transform: scale(0);
            animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }

        h1 {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 12px;
            opacity: 0;
            animation: fadeInUp 0.5s ease-out 0.2s forwards;
        }

        .notfound-message {
            font-size: 1rem;
            color: var(--text-light);
            margin-bottom: var(--space);
            opacity: 0;
            animation: fadeInUp 0.5s ease-out 0.3s forwards;
        }

        .notfound-details {
            background-color: #f9fafb;
            padding: 16px;
            border-radius: var(--radius);
            margin-bottom: var(--space);
            font-family: 'Menlo', 'Consolas', monospace;
            font-size: 0.8125rem;
            text-align: left;
            color: var(--text-light);
            border: 1px solid var(--border);
            opacity: 0;
            animation: fadeInUp 0.5s ease-out 0.4s forwards;
        }

        .action-buttons {
            display: flex;
            justify-content: center;
            gap: 12px;
            opacity: 0;
            animation: fadeInUp 0.5s ease-out 0.5s forwards;
        }

        .btn {
            padding: 10px 20px;
            border-radius: var(--radius);
            font-weight: 500;
            font-size: 0.9375rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: #2563eb;
            transform: translateY(-1px);
        }

        .btn-secondary {
            background-color: white;
            color: var(--primary);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            background-color: #f9fafb;
        }

        footer {
            margin-top: auto;
            text-align: center;
            padding-top: var(--space);
            font-size: 0.8125rem;
            color: var(--text-light);
            opacity: 0;
            animation: fadeIn 0.5s ease-out 0.6s forwards;
        }

        .footer-link {
            color: var(--primary);
            text-decoration: none;
        }

        @keyframes scaleIn {
            0% { transform: scale(0); opacity: 0; }
            80% { transform: scale(1.1); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }

        @keyframes fadeInUp {
            0% { opacity: 0; transform: translateY(10px); }
            100% { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeIn {
            0% { opacity: 0; }
            100% { opacity: 1; }
        }

        @media (max-width: 640px) {
            :root {
                --space: 16px;
            }
            
            .notfound-icon {
                width: 64px;
                height: 64px;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
        }
    </style>
</head>
<body>
    <div class="notfound-container">
        <div class="notfound-icon">
            <div class="notfound-icon-circle"></div>
            <div class="notfound-icon-inner">404</div>
        </div>
        
        <h1>页面未找到</h1>
        <p class="notfound-message">您访问的页面不存在或已被移除</p>
        
        <div class="notfound-details">
            请求的URL: <span id="requestedUrl"></span>
        </div>
        
        <div class="action-buttons">
            <button class="btn btn-primary" id="homeBtn">
                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                    <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
                    <polyline points="9 22 9 12 15 12 15 22"></polyline>
                </svg>
                返回首页
            </button>
            <button class="btn btn-secondary" id="backBtn">
                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                    <path d="M19 12H5M12 19l-7-7 7-7"/>
                </svg>
                返回上一页
            </button>
        </div>
    </div>
    
    <footer>
        <p>&copy; <span id="year"></span> 孤山寺北 · <a href="#" class="footer-link">帮助中心</a></p>
    </footer>

    <script>
        // 自动更新版权年份
        document.getElementById('year').textContent = new Date().getFullYear();
        document.addEventListener('DOMContentLoaded', function() {
            // 显示请求的URL
            document.getElementById('requestedUrl').textContent = window.location.pathname;
            
            // 按钮事件
            document.getElementById('homeBtn').addEventListener('click', function() {
                window.location.href = '/';
            });
            
            document.getElementById('backBtn').addEventListener('click', function() {
                window.history.back();
            });
            
            // 如果是生产环境，添加搜索帮助功能
            if (window.location.hostname !== 'localhost' && window.location.hostname !== '127.0.0.1') {
                const searchHelp = document.createElement('div');
                searchHelp.className = 'notfound-message';
                searchHelp.style.marginTop = '-16px';
                searchHelp.innerHTML = `
                    您可以尝试 <a href="/search?q=${encodeURIComponent(window.location.pathname.split('/').pop())}" 
                    style="color: var(--primary); text-decoration: none;">搜索相关内容</a>
                `;
                document.querySelector('.notfound-message').after(searchHelp);
            }
        });
    </script>
</body>
</html>